<div class="row">
    <div class="col-md-12 col-sm-12">
        <h3 class="widget-title">List Careers</h3>
        <table width="100%">

            <thead class="border-bottom">
                <tr>
                    <th width="5px"></th>
                    <th class="text-center" width='5%'>No</th>
                    <th class="text-left">Position</th>                    
                    <th class="text-center" width='15%'>Actions</th>
                    <th class="text-center" width='15%'>Create Date</th>
                    <th class="text-center" width='15%'>Create By</th>
                </tr>
            </thead>

            <tbody>
                <?php //debug($all)?>
                <?php if (isset($all)&& sizeof($all) != 0) { ?>
                    <?php $i = 1; ?>
                    <?php foreach ($all as $a): ?> 
                    <?php $c = $a['Career'];?>
                        <tr>
                            <td><?php echo $this->Html->link('<i class="icon-stop '.($c['status']=='N'?'c-gray':'c-green').'"></i>', '/Careers/change/' . $c['id'].'/'.$c['status'], array('escape' => false,'title'=>'Click to change status')) ?></td>
                            <td class="text-center"><?php echo $i ?></td>
                            <td><?php echo $c['title'] ?></td>                            
                            <td class="text-center">
                                <?php echo $this->Html->link('<i class="icon-monitor"></i>', '/Careers/view/' . $c['id'], array('escape' => false,'title'=>'View Details')) ?> 
                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                <?php echo $this->Html->link('<i class="icon-pencil"></i>', '/Careers/edit/' . $c['id'], array('escape' => false,'title'=>'Edit')) ?> 
                                &nbsp;&nbsp;|&nbsp;&nbsp;
                                <?php echo $this->Html->link('<i class="icon-remove"></i>', '/Careers/delete/' . $c['id'], array('escape' => false,'title'=>'Delete'), 'Do you want to remove this contact?') ?> 
                            </td>
                            <td class="text-center"><?php echo $c['created'] ?></td>
                            <td class="text-center"><?php echo $c['created_by'] ?></td>
                        </tr>
                        <?php $i++; ?>
                    <?php endforeach; ?> 
                <?php }else { ?>
                        <tr>
                            <td colspan="5">
                                <h5 class="text-center c-red margin-top">Not have position.</h5>
                            </td>
                        </tr>
                <?php } ?>
            </tbody>

        </table>

    </div>
</div>